package com.gpt.article.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gpt.article.mapper.LawyerMapper;
import com.gpt.article.domain.Lawyer;
import com.gpt.article.service.ILawyerService;

/**
 * 律师信息Service业务层处理
 * 
 * @author zhuzi
 * @date 2023-12-29
 */
@Service
public class LawyerServiceImpl implements ILawyerService 
{
    @Autowired
    private LawyerMapper lawyerMapper;

    /**
     * 查询律师信息
     * 
     * @param userid 律师信息主键
     * @return 律师信息
     */
    @Override
    public Lawyer selectLawyerByUserid(Long userid)
    {
        return lawyerMapper.selectLawyerByUserid(userid);
    }

    /**
     * 查询律师信息列表
     * 
     * @param lawyer 律师信息
     * @return 律师信息
     */
    @Override
    public List<Lawyer> selectLawyerList(Lawyer lawyer)
    {
        return lawyerMapper.selectLawyerList(lawyer);
    }

    @Override
    public List<Lawyer> selectLawyerListNogen(Lawyer lawyer)
    {
        return lawyerMapper.selectLawyerListNogen();
    }


    /**
     * 新增律师信息
     * 
     * @param lawyer 律师信息
     * @return 结果
     */
    @Override
    public int insertLawyer(Lawyer lawyer)
    {
        return lawyerMapper.insertLawyer(lawyer);
    }

    /**
     * 修改律师信息
     * 
     * @param lawyer 律师信息
     * @return 结果
     */
    @Override
    public int updateLawyer(Lawyer lawyer)
    {
        return lawyerMapper.updateLawyer(lawyer);
    }

    /**
     * 批量删除律师信息
     * 
     * @param userids 需要删除的律师信息主键
     * @return 结果
     */
    @Override
    public int deleteLawyerByUserids(Long[] userids)
    {
        return lawyerMapper.deleteLawyerByUserids(userids);
    }

    /**
     * 删除律师信息信息
     * 
     * @param userid 律师信息主键
     * @return 结果
     */
    @Override
    public int deleteLawyerByUserid(Long userid)
    {
        return lawyerMapper.deleteLawyerByUserid(userid);
    }
}
